package org.example.application;


import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.example.domain.model.entity.user.req.UserRegisterReq;
import org.example.domain.model.entity.user.req.UserUpdateReq;
import org.example.domain.model.entity.user.resp.UserMessageResp;
import org.example.domain.model.service.user.UserDomainService;
import org.example.domain.system.model.UserAccount;
import org.example.web.result.ResultInfo;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
@Slf4j
public class UserAccountService {
    private final UserDomainService userDomainService;


    public UserMessageResp getUserByUserName(String userName) {
        return userDomainService.getUserByUserName(userName);
    }

    public ResultInfo registerUser(UserRegisterReq userRegisterReq) {
        return userDomainService.registerUser(userRegisterReq);
    }

    public ResultInfo updateUser(UserUpdateReq userUpdateReq) {
        return userDomainService.updateUser(userUpdateReq);
    }

    public UserAccount getUserAccountByUserName(String userName) {
        return userDomainService.getUserAccountByUserName(userName);
    }

    public UserAccount getUserAccountByToken() {
        return userDomainService.getUserAccountByToken();
    }
}
